package com.gzcstec.product.client;


import com.gzcstec.product.dataobject.DecreaseStockInput;
import com.gzcstec.product.dataobject.ProductInfoOutput;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(name = "PRODUCT")
@Component
public interface ProductClient {

    @PostMapping("/product/listForOrder")
    List<ProductInfoOutput> list(@RequestBody List<String> productIdList);

    @PostMapping("/product/decreaseStock")
    void decreaseStock(@RequestBody List<DecreaseStockInput> cartDTOList);
}
